<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
			<form id="my-form" class="layui-form" method="post" enctype="multipart/form-data">
				<div class="widget-head">
					  <div class="widget-title">{if $model['id']}编辑{else\}新增{/if}商品类型
					  </div>
				</div>
				<div class="widget-body layui-col-lg12">
						<div class="layui-form-item">
							<label class="layui-form-label form-require">类型名称 </label>
							<div class="layui-col-sm6 layer-midd-left">
								<input type="text" class="layui-input" name="type[name]" 
									   value="{$model['name']}" required>
							</div>
						</div>
			   
							<input type="hidden" name="type[id]" value="{$model['id']??''}">
				  
						<div class="layui-input-block">                            
								<button type="submit" class="j-submit layui-btn ">提交
						</div>		
				</div>
					
			</form>
				
        </div>
    </div>
</div>

<script>
    $(function () {

        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();

    });
</script>

